<html>
	<head>
		<title>无锡光洋轴承自动化信息系统</title>
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
			<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />
			<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
			<script type="text/javascript" src="extjs/ext-all.js"></script>
			<script type="text/javascript" src="js/lefttree.js"></script>
			<script type="text/javascript" src="extjs/ux/TabCloseMenu.js"></script>
			<script type="text/javascript" src="extjs/ux/fileuploadfield/FileUploadField.js"></script>

			<link rel="stylesheet" type="text/css" href="css/index.css"/>
			<link rel="stylesheet" type="text/css" href="extjs/ux/fileuploadfield/css/fileuploadfield.css"/>
			<link rel="stylesheet" type="text/css" title="blue"      href="extjs/resources/css/xtheme-blue.css" />
			<link rel="stylesheet" type="text/css" title="gray"      href="extjs/resources/css/xtheme-gray.css" />
			<link rel="stylesheet" type="text/css" title="access"    href="extjs/resources/css/xtheme-access.css" />
			<link rel="stylesheet" type="text/css" title="yourtheme" href="extjs/resources/css/yourtheme.css" />
			
			<link rel="stylesheet" type="text/css" href="extjs/ux/treegrid/treegrid.css" rel="stylesheet" />
      <script type="text/javascript" src="extjs/ux/treegrid/TreeGridSorter.js"></script>
      <script type="text/javascript" src="extjs/ux/treegrid/TreeGridColumnResizer.js"></script>
      <script type="text/javascript" src="extjs/ux/treegrid/TreeGridNodeUI.js"></script>
      <script type="text/javascript" src="extjs/ux/treegrid/TreeGridLoader.js"></script>
      <script type="text/javascript" src="extjs/ux/treegrid/TreeGridColumns.js"></script>
      <script type="text/javascript" src="extjs/ux/treegrid/TreeGrid.js"></script>
			
			<script type="text/javascript" src="js/styleswitcher.js"></script>
			<script type="text/javascript" src="js/main.js"></script>
			<script type="text/javascript" src="js/top.js"></script>
			<script type="text/javascript" src="js/devices.js"></script>
			<script type="text/javascript" src="js/report.js"></script>
			<script type="text/javascript" src="js/report_line.js"></script>
			<script type="text/javascript" src="js/report_sort.js"></script>
			<script type="text/javascript" src="js/manager.js"></script>
			<script type="text/javascript" src="js/sysinfo.js"></script>
			<script type="text/javascript" src="js/sys_log.js"></script>
			<script type="text/javascript" src="js/devices_error.js"></script>
			<script type="text/javascript" src="js/result.js"></script>
			

			<script language='Javascript'>
				Ext.BLANK_IMAGE_URL = "extjs/resources/images/default/s.gif";
				Ext.chart.Chart.CHART_URL = 'extjs/resources/charts.swf';
				Ext.QuickTips.init();

				SetSysPath("${pageContext.request.contextPath}");
				Ext.onReady(function()
				{
					Ext.state.Manager.setProvider(new Ext.state.CookieProvider());


					var tb = new Ext.Toolbar({
						items:[
						'当前用户: admin',
						'-',
						{
							text: '修改密码',
							iconCls: 'modifypwd',
							handler: function(){
								ModifyPassword();
							}
						},'-',{
							text: '注销',
							iconCls: 'logout',
							handler: function(){
								var ret = confirm("你确定要退出系统吗?");
								if(ret) {
									LogoutSystem();
								}
							}
						}]
					});

					var topitem = new Ext.Panel({
						layout:'fit',
						border: false,
						split:true,
						bbar: tb,
						autoScroll:true,
						html: "<iframe src='title.html'  id='_title' name='_title' height=70 width=100% frameborder=no border=0 marginwidth=0 marginheight=0  allowtransparency=yes></iframe>"
					});

					var tabs = new Ext.TabPanel({
						resizeTabs:true,
						minTabWidth: 115,
						tabWidth:135,
						enableTabScroll:true,
						defaults: {autoScroll:true},
						plugins: new Ext.ux.TabCloseMenu()

					});

					function doLinkClose(){
						location.href="${pageContext.request.contextPath}/index.jsp";
					}
					function doLinkClick(id,node_text,node_icon){
						AddMainTab(id,node_text,node_icon,tabs);
					}

					
					
					////////////////////////////////////////////////
					//首页
					var builds = new Array(
						["10000001","仪表盘","tip"],
						["10000002","异常设备","server"]
					);
					var topTree = BuildTree(builds,doLinkClick);
					///////////////////////////////////////////////
					//设备信息
					builds = new Array(
						["20000001","设备","server"]
					);
					var deviceTree = BuildTree(builds,doLinkClick);
					//////////////////////////////////////////////
					//报表
					builds = new Array(
						["30000001","统计报表","count"],
						["30000002","产线报表","count"],
						["30000003","分类报表","count"],
						["30000004","生产结果","count"]
					);
					var reportTree = BuildTree(builds,doLinkClick);
					
					//////////////////////////////////////////////
					//系统设置
					builds = new Array(
					["40000001","管理员","manager"],
					["40000002","系统信息","save"],
					["40000003","系统日志","sys_log"]		
					);
					var systemTree = BuildTree(builds,doLinkClick);



					var viewport = new Ext.Viewport({
						layout:'border',
						items:[{
							region: 'north',
							id: 'north-panel',
							height: 99,
							margins:'0 0 0 0',
							cmargins:'0 0 0 0',
							items:[topitem]
						},{
							region:'west',
							id:'west-panel',
							title:'管理',
							split:true,
							width: 200,
							minSize: 175,
							maxSize: 400,
							collapsible: true,
							margins:'5 0 5 5',
							cmargins:'35 5 5 5',
							layout:'accordion',

							layoutConfig:{
								animate:true
							},
							items: [
							{
								items:[topTree],
								title:'首页',
								border:false,
								autoScroll:true,
								iconCls:'tip'
							},{
								items:[deviceTree],
								title:'设备信息',
								border:false,
								autoScroll:true,
								iconCls:'server'
							},{
								items:[reportTree],
								title:'报表',
								border:false,
								autoScroll:true,
								iconCls:'count'
							},{
								items:[systemTree],
								title:'系统',
								border:false,
								autoScroll:true,
								iconCls:'info'
							}]
						},{
							region:'center',
							margins:'5 5 5 0',

							layout:'fit',
							autoScroll:false,
							items:[{
								columnWidth:0,
								baseCls:'x-plain',
								bodyStyle:'padding:0 0 0 0',
								layout:'fit',
								items:[tabs]
							}]
						}]
					});

					//AddMainTab("20000001","信息与警告","tip", tabs);
				}
				);
			</script>
		</head>
		<body>
		</body>
	</html>
